<script src="/s/js/sprintf.js"></script> 
<script>
var sumFanArr = [ {% for i in playerSumFanArr %}{{ i }},{% endfor %} ];
var playerPosition = { {% for i in players %} "{{ i }}":{{ forloop.counter0 }}, {% endfor %} "":-1};
//last item "":-1 is to prevent error in IE

var newRowEditCell = "<a href=\"/play/official_mahjong/{{ gameKey }}/?session={{ sessionNumber }}&hand=%s\">Edit</a>";
</script>

<table id="sessionTable" border="1">
    <tr>
    <th colspan=2>&nbsp;</th>
    {% for i in players %}
        <th>{{ i }}</th>
    {% endfor %}
    <th>&nbsp;</th>
    </tr>
    
    <tr>
    <td colspan=2>Sum Fans</td>
    {% for i in playerSumFanArr %}
        <td id="sumFan_{{ forloop.counter0 }}">{{ i }}</td>
    {% endfor %}
    <td>&nbsp;</td>
    </tr>
    
    {% for i in handsArr %}
        <tr>
        <td>{{ i.roundWindName }}</td>
        <td>{{ i.seatWindName }}</td>
        {% for j in i.fansArr %}
            <td>{{ j }}</td>
        {% endfor %}
        <td><a href="/play/official_mahjong/{{ gameKey }}/?session={{ sessionNumber }}&hand={{ i.handNumber }}">Edit</a></td>
        </tr>        
    {% endfor %}
</table>